package com.chixing.controller;

import com.chixing.service.IndexHotDateControllerService;
import com.chixing.util.ServerResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class IndexHotDateController {

    @Autowired
    private IndexHotDateControllerService indexHotDateControllerService;

    @GetMapping("indexHot")
    @ResponseBody
    public ServerResult indexHot() {

        ServerResult serverResult = indexHotDateControllerService.getHotCar();
        System.out.println("ServerResult: \n" + serverResult.getData());
        return serverResult;

    }

}
